//
//  WJHeaderViewController.m
//  WJBSApp
//
//  Created by dllo on 16/7/13.
//  Copyright © 2016年 王景伟. All rights reserved.
//
// 引导页 从新写一下引导页
#import "WJHeaderViewController.h"
#import "WJTabBarViewController.h"
#import "UIButton+InitButton.h"

@interface WJHeaderViewController ()

@property (nonatomic,retain) UIImageView *picView;

@end

@implementation WJHeaderViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.picView = [[UIImageView alloc]initWithFrame:self.view.bounds];
    _picView.backgroundColor = BSWhiteColor;
    [self.view addSubview:_picView];
    self.picView.image = [UIImage imageNamed:@"appicon"];
    
    // 点击进入下一页
    UIButton *jumpButton = [UIButton buttonWithTitle:nil frame:CGRectMake(0, 0, WIDTH, HEIGHT) target:self action:@selector(jumptabBar)];
    [self.view addSubview:jumpButton];
    jumpButton.backgroundColor = BSClearColor;

}

- (void)jumptabBar
{
    //点击按钮进入主页面,同时会销毁这个控制器  动画效果
    [UIView animateWithDuration:0.5 animations:^{
        WJTabBarViewController *tabbar = [[WJTabBarViewController alloc]init];
        tabbar.view.backgroundColor = BSWhiteColor;
        [UIApplication sharedApplication].keyWindow.rootViewController = tabbar;
        [_picView stopAnimating];
    }];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
